./logistics-worker-distribution/rmiLogisticsWorker.sh factory1 > logistics-worker-factory1.log &
./logistics-worker-distribution/rmiLogisticsWorker.sh factory2 > logistics-worker-factory2.log &
./logistics-worker-distribution/rmiLogisticsWorker.sh factory3 > logistics-worker-factory3.log &

sleep 3

./tester-worker-distribution/rmiTesterWorker.sh factory1 COMPLETENESS > tester-worker-completeness-factory1.log &
sleep 2
./tester-worker-distribution/rmiTesterWorker.sh factory1 DEFECT > tester-worker-defect-factory1.log &
./tester-worker-distribution/rmiTesterWorker.sh factory2 COMPLETENESS > tester-worker-completeness-factory2.log &
sleep 2
./tester-worker-distribution/rmiTesterWorker.sh factory2 DEFECT > tester-worker-defect-factory2.log &
./tester-worker-distribution/rmiTesterWorker.sh factory3 COMPLETENESS > tester-worker-completeness-factory3.log &
sleep 2
./tester-worker-distribution/rmiTesterWorker.sh factory3 DEFECT > tester-worker-defect-factory3.log &

sleep 3

./producer-distribution/rmiProducer.sh CPU 500 0 factory1 > producer-cpu-factory1.log &
sleep 2
./producer-distribution/rmiProducer.sh Mainboard 500 0 factory1 > producer-mainboard-factory1.log &
./producer-distribution/rmiProducer.sh RAM 800 0 factory1 > producer-ram-factory1.log &
./producer-distribution/rmiProducer.sh GraphicsCard 300 0 factory1 > producer-graphicscard-factory1.log &

./producer-distribution/rmiProducer.sh CPU 100 0 factory2 > producer-cpu-factory2.log &
sleep 2
./producer-distribution/rmiProducer.sh Mainboard 10 0 factory2 > producer-mainboard-factory2.log &
./producer-distribution/rmiProducer.sh RAM 1800 0 factory2 > producer-ram-factory2.log &

./producer-distribution/rmiProducer.sh CPU 2000 0 factory3 > producer-cpu-factory3.log &
sleep 2
./producer-distribution/rmiProducer.sh Mainboard 1000 0 factory3 > producer-mainboard-factory3.log &
./producer-distribution/rmiProducer.sh RAM 500 0 factory3 > producer-ram-factory3.log &
./producer-distribution/rmiProducer.sh GraphicsCard 1300 0 factory3 > producer-graphicscard-factory3.log &

echo Warten bis Producer fertig sind
echo Press Enter to continue
read
echo Starten der Assembly worker
./assembly-worker-distribution/rmiAssemblyWorker.sh factory1 > assembly-worker-factory1-1.log &
./assembly-worker-distribution/rmiAssemblyWorker.sh factory1 > assembly-worker-factory1-2.log &
./assembly-worker-distribution/rmiAssemblyWorker.sh factory2 > assembly-worker-factory2-1.log &
./assembly-worker-distribution/rmiAssemblyWorker.sh factory2 > assembly-worker-factory2-2.log &
./assembly-worker-distribution/rmiAssemblyWorker.sh factory3 > assembly-worker-factory3-1.log &
./assembly-worker-distribution/rmiAssemblyWorker.sh factory3 > assembly-worker-factory3-2.log &
./assembly-worker-distribution/rmiAssemblyWorker.sh factory3 > assembly-worker-factory3-3.log &
./assembly-worker-distribution/rmiAssemblyWorker.sh factory3 > assembly-worker-factory3-4.log &

echo Starten des Load Balancer
./load-balancer-distribution/rmiLoadBalancer.sh factory1 factory2 factory3 > load-balancer.log &
